#include <stdio.h>

int main(int argc, char const *argv[])
{
    const int n = 4;
    int k = 0;
    int i = 0;
    int j = 0;
    int r = 0;
    int a[4][4] = {{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}, {13, 14, 15, 16}};
    int b[4][4] = {{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}, {13, 14, 15, 16}};
    int c[4][4] = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}};
    
    for (k = 0; k < n; k++)
    {
        for (i = 0; i < n; i++)
        {
            r = a[i][k];
            // printf("a[%d][%d]\n", i, k);
            for (j = 0; j < n; j++) {
                c[i][j] += r * b[k][j];
                printf("c[%d][%d] += a[%d][%d] + b[%d][%d]\n", i, j, i, k, k, j);
            }
        }
    }
    return 0;
}
